package com.wxy.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author 47868
 */
@Service("AsyncTest")
public class AsyncTest {
    @Async("AsyncTask")
    public void asyncTest() {
        try {
            Thread.sleep(1000);
        }
        catch (InterruptedException e) {
            System.out.println(e.getMessage());
        }
        System.out.println("这是async异步输出");
    }
}
